<?php
$db->mysqlDB->falseAutoCommit();

$params = $route->bodyParams;

$P1 = array(
    "update_where" => "oim_id",
    "oim_id" => $params['oim_id'],
    "oim_status" => 1
);

$R1 = $db->mysqlDB->automaticUpdate($P1)->update("easyd_oa_internal_mail");

$P2 = array(
    "update_where" => "oim_fid",
    "oim_fid" => $params['oim_id'],
    "oim_status" => 1
);

$R2 = $db->mysqlDB->automaticUpdate($P2)->update("easyd_oa_internal_mail");

if(!$R1||!$R2){
    $db->mysqlDB->rollBackCommint();
    $db->mysqlDB->trueAutoCommit();
    $response->responseData( false );
}else{
    $db->mysqlDB->actionCommint();
    $db->mysqlDB->trueAutoCommit();
    $response->responseData( true );
}
